<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class MY_Controller extends CI_Controller
{
	public function __construct()
	{
		parent::__construct();

		// 数据库
		$this->load->model('Menu_model');
		$this->load->model('Category_model');
		$this->load->model('Website_model');
		$this->load->library('session');
		$this->load->helper('url');


		// 判断用户登录
		define('UID',is_login());
		if( !UID ){// 还没登录 跳转到登录页面
			redirect(base_url('/'));
		}
		
	}
}
